import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import eslintPlugin from '@nabla/vite-plugin-eslint';

const proxyTarget = 'http://localhost:8000'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(), eslintPlugin()],
  server: {
    proxy: {
      '/api': {
        target: `${proxyTarget}`,
        changeOrigin: true,
        proxyTimeout: 3000,
      }
    }
  }
})
